package cn.shop.utils.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author jzw
 * @since 2021-12-13 10:58
 */
public enum TransactionState {
	/**
	 * 待付款
	 */
	PENDING_PAYMENT(1, "待付款"),
	COMPLETED(2, "已完成"),
	CANCELLED(3, "已取消"),
	MANUAL(4, "手动充值");

	TransactionState(int code, String description) {
		this.code = code;
		this.description = description;
	}

	@EnumValue
	private final int code;

	@JsonValue
	private final String description;

	public int getCode() {
		return code;
	}

	public String getDescription() {
		return description;
	}
}
